<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //1.基本用法
//  1.1Es6之前
 const name = "why"
 const age = 18

//  const info = "my name is" + name +", age is " + age
//2.Es6之后
// const info = ` ma name is ${name} ,age is  ${age}`
    
//2.标签模版字符串的用法
function foo(...args){
  console.log("参数",args)

}
// foo("why",18,1.88)
//反引号也可以调用函数的  并且会将反引号里面的内容传入函数里面去

foo`my name is ${name},age is ${age}`

  </script>
</body>
</html>